package net.uiiang.android.BiscuitBoxDemo.text.style;

import net.uiiang.android.BiscuitBox.R;
import android.app.Activity;
import android.graphics.Typeface;
import android.os.Bundle;
import android.widget.TextView;

public class FontsDemo extends Activity {
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.fonts_demo);

        /*
         * 字体的使用很简单 在asset里面建一个文件夹Fonts 然后使用如下代码引用
         */
        Typeface fontFace = Typeface.createFromAsset(getAssets(),
                "Fonts/adffaa.ttf");
        TextView someText = (TextView) findViewById(R.id.TextView01);
        someText.setTypeface(fontFace);
        someText.setTextSize(40.f);
        someText.setText("Hello Android");
    }
}
